package nc.tb.excel.ctl;

import java.io.File;
import java.io.OutputStream;

import nc.vo.pub.BusinessException;

public interface IExcelOperate {
/*mode: 0-->>readonly,
	  1-->>writable,*/
void initOperator(File file, int mode) throws BusinessException;
void write2Stream(OutputStream os) throws BusinessException;
String[] getAllSheetsName() throws BusinessException;
boolean isSheetExist(String sheetName);
boolean isSheetExist(int sheetIndex);
boolean isRowExist(String sheetName,int row);
boolean isRowExist(int sheetIndex,int row);
boolean isRowFirstCellEmpty(String sheetName,int row);
int getLastRowNum(String sheetName);
int getFirstRowNum(String sheetName);
IExcelCell getCellByName(String sheetName,int row, int col) throws BusinessException;
IExcelCell getCellByIndex(int sheetIndex,int row, int col) throws BusinessException;
IExcelSheet getExcelSheetByName(String sheetName);
}
